package com.kyw.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.kyw.mapper.HealtheducationMapper;
import com.kyw.model.entity.Healtheducation;
import com.kyw.service.HealtheducationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HealtheducationServiceImpl implements HealtheducationService {

    @Autowired
    private HealtheducationMapper healtheducationMapper;

    @Override
    public PageInfo<Healtheducation> findHealtheducation(Integer page, Integer limit) {
        PageHelper.startPage(page,limit);
        List<Healtheducation> healtheducation = healtheducationMapper.findHealtheducation();
        return new PageInfo<>(healtheducation);
    }
}
